﻿using System.Xml.Linq;
using Microsoft.Data.Entity.Design.Extensibility;
using System.ComponentModel;

namespace Liekhus.EntityFramework.XAFExtensions.CustomAttributes
{
    public class ImageNameProperty : BaseCustomAttribute<string>
    {
        public ImageNameProperty(XElement parent, PropertyExtensionContext context)
            : base(parent, context)
        {

        }

        public override string PropertyName { get { return "ImageName"; } }
        public override string PropertyFormat { get { return "[ImageName(\"{value}\")]"; } }
        public override string DefaultValue { get { return "BO_Unknown"; }}

        [DisplayName("Image Name")]
        [Description("Image to display in navigational areas for the entity.")]
        public override string PropertyValue
        {
            get
            {
                return base.PropertyValue;
            }
            set
            {
                base.PropertyValue = value;
            }
        }
    }
}
